package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.HanoiGroupAddPapResponse;
import com.taobao.api.ApiRuleException;
/**
 * TOP API: taobao.hanoi.group.add.pap request
 * 
 * @author auto create
 * @since 1.0, 2013-08-03 16:51:00
 */
public class HanoiGroupAddPapRequest implements TaobaoRequest<HanoiGroupAddPapResponse> {

	private Map<String, String> headerMap = new TaobaoHashMap();
	private TaobaoHashMap udfParams; // add user-defined text parameters
	private Long timestamp;

	/** 
	* 认证信息
	 */
	private String appName;

	/** 
	* 分组的简单描述
	 */
	private String description;

	/** 
	* 分组的编码
	 */
	private String groupCode;

	/** 
	* 分组的名称
	 */
	private String name;

	/** 
	* 开放策略 true开放，默认为false
	 */
	private Boolean open;

	/** 
	* 使用场景
	 */
	private Long scene;

	/** 
	* 分组的类型，0 互斥，1 共存，默认为0
	 */
	private Long type;

	public void setAppName(String appName) {
		this.appName = appName;
	}
	public String getAppName() {
		return this.appName;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	public String getDescription() {
		return this.description;
	}

	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}
	public String getGroupCode() {
		return this.groupCode;
	}

	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return this.name;
	}

	public void setOpen(Boolean open) {
		this.open = open;
	}
	public Boolean getOpen() {
		return this.open;
	}

	public void setScene(Long scene) {
		this.scene = scene;
	}
	public Long getScene() {
		return this.scene;
	}

	public void setType(Long type) {
		this.type = type;
	}
	public Long getType() {
		return this.type;
	}

	public Long getTimestamp() {
		return this.timestamp;
	}

	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}

	public String getApiMethodName() {
		return "taobao.hanoi.group.add.pap";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("app_name", this.appName);
		txtParams.put("description", this.description);
		txtParams.put("group_code", this.groupCode);
		txtParams.put("name", this.name);
		txtParams.put("open", this.open);
		txtParams.put("scene", this.scene);
		txtParams.put("type", this.type);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public void putOtherTextParam(String key, String value) {
		if(this.udfParams == null) {
			this.udfParams = new TaobaoHashMap();
		}
		this.udfParams.put(key, value);
	}

	public Class<HanoiGroupAddPapResponse> getResponseClass() {
		return HanoiGroupAddPapResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(appName,"appName");
		RequestCheckUtils.checkNotEmpty(groupCode,"groupCode");
		RequestCheckUtils.checkNotEmpty(name,"name");
	}

	public Map<String, String> getHeaderMap() {
		return headerMap;
	}
}
